from conf.env import url
from pages.pages import LoginPage
from time import sleep
from selenium import webdriver


class Event:
    @staticmethod#不需要生成实例,就可以直接使用
    def event_login(driver,username,password):
        login=LoginPage(driver)
        login.type_account(username)
        login.wait(2)
        login.type_password(password)
        login.wait(2)
        login.type_submit()
        #获取断言值
        # return login.assert_text()
        
if __name__=='__main__':
    driver = webdriver.Chrome()
    driver.maximize_window()
    sleep(2)
    driver.get(url)
    Event.event_login(driver,'admim','123456')

        
    